<template>
	<view style="min-height: 100vh;background: #f3f0f0;">
		<view class="" style="background: #fff;margin-top: 10rpx;padding-bottom: 10rpx;" v-for="(item,index) in dataList" :key="index">
			<view class="flex justify-between" style="border-bottom: 1rpx solid #eeeeee;padding: 0 20rpx;height: 60rpx;font-size: 28rpx;line-height: 60rpx;">
				<view class="">会员购买金额</view>
				<view class="" style="color: #faad14;">{{item.pay_fee}}元</view>
			</view>
			<view class="flex justify-between" style="font-size: 26rpx;padding: 5rpx 20rpx;margin-top: 15rpx;;color: #666666;">
				<view class="">支付状态</view>
				<view class="" style="color: #faad14;">{{item.status_text}}</view>
			</view>
			<view class="flex justify-between" style="font-size: 26rpx;padding: 5rpx 20rpx;color: #666666;">
				<view class="">会员购买渠道</view>
				<view class="" style="color: #c0c0c0;">{{item.platform_text}}</view>
			</view>
			<view class="flex justify-between" style="font-size: 26rpx;padding: 5rpx 20rpx;color: #666666;">
				<view class="">会员购买单号</view>
				<view class="" style="color: #c0c0c0;">{{item.order_sn}}</view>
			</view>
			<view class="flex justify-between" style="font-size: 26rpx;padding: 5rpx 20rpx;color: #666666;">
				<view class="">会员购买时间</view>
				<view class="" style="color: #c0c0c0;">{{item.paid_time}}</view>
			</view>
		</view>
		<view class="" style="text-align: center;color: rgb(119, 119, 119);margin: 20rpx 0;">没有更多数据了</view>
	</view>
</template>

<script>
	import {
		getTradeOrderVipList
	} from "@/apis/index.js"
	export default {
		data() {
			return {
				list_rows: 8,
				page: 1,
				last_page: '',
				dataList: []
			}
		},
		async onLoad() {
			uni.setNavigationBarTitle({
				title: '会员购买记录'
			})
			await this.getData()
		},
		onReachBottom() {
			if (this.page < this.last_page) {
				this.page++
				this.getData()
			}
		},
		methods: {
			async getData() {
				let res = await getTradeOrderVipList(this.list_rows, this.page)
				console.log(res, '-----=')
				this.dataList = [...this.dataList, ...res.data.data]
				this.last_page = res.data.last_page
			}
		}
	}
</script>

<style lang="scss" scoped>


</style>